<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script src="./art-template/template-web.js"></script>
    <script type="text/template" id="tpl">
    <!-- html代码渲染会出问题，解决思路加#号 -->
    {{src}}
    {{content}}
    </script>
    <script>
    var obj = {
        src:'<img src="./avatar.jpg">',
        content:'<p>aaaa</p>'
    }
    var html = template('tpl',obj);
    document.body.innerHTML = html;
    </script>
</body>
</html>